package cn.com.customer.manager.adapter

import android.graphics.drawable.Drawable
import android.view.View
import android.widget.ImageView
import android.widget.TextView
import cn.com.customer.manager.R
import cn.com.customer.manager.bean.MsgBean
import cn.com.customer.manager.bean.Notice
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.xuexiang.xui.utils.DensityUtils
import com.xuexiang.xui.widget.imageview.RadiusImageView


class MessageListAdapter(rid: Int) : BaseQuickAdapter<Notice, BaseViewHolder>(rid) {
    override fun convert(helper: BaseViewHolder?, item: Notice?) {
        if (item != null) {
            helper?.let {
                val iv_msg_type = helper?.getView(R.id.iv_msg_type) as RadiusImageView
                val iv_is_read = helper?.getView(R.id.iv_is_read) as ImageView   //未读消息
                val iv_right = helper?.getView(R.id.iv_right) as ImageView   //箭头
                val tv_msg_desc = helper?.getView(R.id.tv_msg_desc) as TextView   //消息描述
                helper.setText(R.id.tv_msg_name,item.noticeTitle)
                helper.setText(R.id.tv_msg_desc,item.noticeContent)
            }
        }
    }
}